package cc.eddic.practice.spring.web;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
public class FieldError {
    public FieldError(String field) {
        this.field = field;
        this.errors = new ArrayList<>();
    }

    public void add(String error) {
        this.errors.add(error);
    }

    private final String field;

    private final List<String> errors;
}
